import uvicorn
from fastapi import FastAPI,Body
from fastapi.responses import JSONResponse
from typing import Dict
app = FastAPI()
from modelscope import AutoTokenizer, AutoModel, snapshot_download
model_dir = "i:/models/deepseek-ai/DeepSeek-V3"           #直接提供chatGLM3的存储地址
tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
model = AutoModel.from_pretrained(model_dir, trust_remote_code=True)  #.quantize(4).cuda()

prompt_text = '小孩牙龈肿痛服用什么药'

result = model.chat(tokenizer,prompt_text,history=[])
print(result)